USE [DBCursoDotNetDEV]
/****** Object:  Table [dbo].[TBCursoHorario]    Script Date: 08/14/2012 16:59:26 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[TBCursoHorario](
	[IDCursoHorario] [int] IDENTITY(1,1) NOT NULL,
	[Dias] [varchar](50) NOT NULL,
	[HoraInicial] [char](5) NOT NULL,
	[HoraFinal] [char](5) NOT NULL,
 CONSTRAINT [PK_TBCursoHorario] PRIMARY KEY CLUSTERED 
(
	[IDCursoHorario] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

GO

/****** Object:  Table [dbo].[TBTipoCurso]    Script Date: 08/14/2012 16:59:56 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[TBTipoCurso](
	[IDTipoCurso] [int] IDENTITY(1,1) NOT NULL,
	[NOCurso] [varchar](50) NOT NULL,
	[VLCurso] [decimal](12, 2) NOT NULL,
	[CargaHoraria] [int] NULL,
	[Ementa] [text] NOT NULL,
	[PreRequisito] [text] NOT NULL,
 CONSTRAINT [PK_TBTipoCurso] PRIMARY KEY CLUSTERED 
(
	[IDTipoCurso] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[TBTipoCurso] ADD  CONSTRAINT [DF__TBTipoCur__NOCur__0CBAE877]  DEFAULT ('ASP.NET') FOR [NOCurso]
GO

ALTER TABLE [dbo].[TBTipoCurso] ADD  CONSTRAINT [DF_TBTipoCurso_VLCurso]  DEFAULT ((800)) FOR [VLCurso]
GO





GO

/****** Object:  Table [dbo].[TBCurso]    Script Date: 08/14/2012 16:59:15 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[TBCurso](
	[IDCurso] [int] IDENTITY(1,1) NOT NULL,
	[DTInicio] [datetime] NOT NULL,
	[DTFim] [datetime] NOT NULL,
	[Status] [smallint] NOT NULL,
	[IDTipoCurso] [int] NOT NULL,
	[IDCursoHorario] [int] NOT NULL,
 CONSTRAINT [PK_TBCurso] PRIMARY KEY CLUSTERED 
(
	[IDCurso] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[TBCurso]  WITH CHECK ADD  CONSTRAINT [FK_TBCurso_TBCursoHorario] FOREIGN KEY([IDCursoHorario])
REFERENCES [dbo].[TBCursoHorario] ([IDCursoHorario])
GO

ALTER TABLE [dbo].[TBCurso] CHECK CONSTRAINT [FK_TBCurso_TBCursoHorario]
GO

ALTER TABLE [dbo].[TBCurso]  WITH CHECK ADD  CONSTRAINT [FK_TBCurso_TBTipoCurso] FOREIGN KEY([IDTipoCurso])
REFERENCES [dbo].[TBTipoCurso] ([IDTipoCurso])
GO

ALTER TABLE [dbo].[TBCurso] CHECK CONSTRAINT [FK_TBCurso_TBTipoCurso]
GO


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[TBNovidade]') AND type in (N'U'))
BEGIN 
CREATE TABLE [TBNovidade](
	[IDNovidade] [int] IDENTITY(1,1) NOT NULL,
	[Titulo] [varchar](50) NOT NULL,
	[SubTitulo] [varchar](150) NOT NULL,
	[Texto] [text] NOT NULL,
	[DTNovidade] [datetime] NOT NULL,
	[IMGNovidade] [varchar](300) NULL,
	[STAtivo] [bit] NOT NULL,
 CONSTRAINT [PK_TBNovidade] PRIMARY KEY CLUSTERED 
(
	[IDNovidade] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[TBTipoTutorial]') AND type in (N'U'))
BEGIN
CREATE TABLE [TBTipoTutorial](
	[IDTipoTutorial] [int] IDENTITY(1,1) NOT NULL,
	[DETipoTutorial] [varchar](30) NOT NULL,
 CONSTRAINT [PK_TBTipoTutorial] PRIMARY KEY CLUSTERED 
(
	[IDTipoTutorial] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[TBAssunto]') AND type in (N'U'))
BEGIN
CREATE TABLE [TBAssunto](
	[IDAssunto] [int] IDENTITY(1,1) NOT NULL,
	[DEAssunto] [varchar](20) NOT NULL,
 CONSTRAINT [PK_TBAssunto] PRIMARY KEY CLUSTERED 
(
	[IDAssunto] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[TBAluno]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[TBAluno](
	[IDAluno] [int] IDENTITY(1,1) NOT NULL,
	[Nome] [varchar](50) NOT NULL,
	[Endereco] [varchar](100) NOT NULL,
	[RG] [char](10) NOT NULL,
	[CPF] [char](11) NOT NULL,
	[DTNascimento] [datetime] NOT NULL,
	[Tel] [char](8) NOT NULL,
	[Cel] [char](8) NOT NULL,
	[Email] [varchar](50) NOT NULL,
	[Senha] [varchar](64) NOT NULL,
	[STPago] [bit] NOT NULL CONSTRAINT [DF_TBAluno_STPago]  DEFAULT ((0)),
	[STAdmin] [bit] NOT NULL CONSTRAINT [DF_TBAluno_STAdmin]  DEFAULT ((0)),
	[Curriculo] [varchar](50) NULL,
	[Foto] [varchar](50) NULL,
 CONSTRAINT [PK_TBAluno] PRIMARY KEY CLUSTERED 
(
	[IDAluno] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
CREATE TABLE [dbo].[TBEmpresa](
	[IDEmpresa] [int] IDENTITY(1,1) NOT NULL,
	[Nome] [varchar](50) NOT NULL,
	[Telefone] [char](8) NULL,
	[Email] [varchar](50) NULL,
 CONSTRAINT [PK_TBEmpresa] PRIMARY KEY CLUSTERED 
(
	[IDEmpresa] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[TBAvaliacaoCurso]') AND type in (N'U'))
BEGIN
CREATE TABLE [TBAvaliacaoCurso](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[AvaliacaoGeral] [smallint] NOT NULL,
	[CounteudoCurso] [smallint] NOT NULL,
	[CounteudoCursoDescricao] [varchar](250) NULL,
	[FormaApresentacaoAula] [smallint] NOT NULL,
	[Aplicabilidade] [smallint] NOT NULL,
	[CargaHoraria] [smallint] NOT NULL,
	[Vocabulario] [smallint] NOT NULL,
	[DominioProfessor] [smallint] NOT NULL,
	[TecnicaEnsino] [smallint] NOT NULL,
	[RecursoAudioVisual] [smallint] NOT NULL,
	[InstalacaoFisica] [smallint] NOT NULL,
	[NotaFinal] [decimal](3, 1) NOT NULL,
	[Observacao] [text] NULL,
 CONSTRAINT [chave] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[TBTutorial]') AND type in (N'U'))
BEGIN
CREATE TABLE [TBTutorial](
	[IDTutorial] [int] IDENTITY(1,1) NOT NULL,
	[Titulo] [varchar](50) NOT NULL,
	[Descricao] [varchar](250) NOT NULL,
	[DTPostagem] [datetime] NOT NULL,
	[IDAssunto] [int] NOT NULL,
	[IDTipoTutorial] [int] NOT NULL,
	[STAtivo] [bit] NOT NULL,
	[URL] [varchar](100) NOT NULL,
 CONSTRAINT [PK_TBTutorial] PRIMARY KEY CLUSTERED 
(
	[IDTutorial] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[TBCursoAluno]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[TBCursoAluno](
	[IDCurso] [int] NOT NULL,
	[IDAluno] [int] NOT NULL,
	[Status] [smallint] NOT NULL,
 CONSTRAINT [PK_TBCursoAluno] PRIMARY KEY CLUSTERED 
(
	[IDCurso] ASC,
	[IDAluno] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[FK_TBTutorial_TBAssunto]') AND parent_object_id = OBJECT_ID(N'[TBTutorial]'))
ALTER TABLE [TBTutorial]  WITH CHECK ADD  CONSTRAINT [FK_TBTutorial_TBAssunto] FOREIGN KEY([IDAssunto])
REFERENCES [TBAssunto] ([IDAssunto])
GO
ALTER TABLE [TBTutorial] CHECK CONSTRAINT [FK_TBTutorial_TBAssunto]
GO
IF NOT EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[FK_TBTutorial_TBTipoTutorial]') AND parent_object_id = OBJECT_ID(N'[cursodotnet].[TBTutorial]'))
ALTER TABLE [TBTutorial]  WITH CHECK ADD  CONSTRAINT [FK_TBTutorial_TBTipoTutorial] FOREIGN KEY([IDTipoTutorial])
REFERENCES [TBTipoTutorial] ([IDTipoTutorial])
GO
ALTER TABLE [TBTutorial] CHECK CONSTRAINT [FK_TBTutorial_TBTipoTutorial]
GO
IF NOT EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_TBCursoAluno_TBAluno]') AND parent_object_id = OBJECT_ID(N'[dbo].[TBCursoAluno]'))
ALTER TABLE [dbo].[TBCursoAluno]  WITH CHECK ADD  CONSTRAINT [FK_TBCursoAluno_TBAluno] FOREIGN KEY([IDAluno])
REFERENCES [dbo].[TBAluno] ([IDAluno])
GO
ALTER TABLE [dbo].[TBCursoAluno] CHECK CONSTRAINT [FK_TBCursoAluno_TBAluno]
GO
IF NOT EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_TBCursoAluno_TBCurso]') AND parent_object_id = OBJECT_ID(N'[dbo].[TBCursoAluno]'))
ALTER TABLE [dbo].[TBCursoAluno]  WITH CHECK ADD  CONSTRAINT [FK_TBCursoAluno_TBCurso] FOREIGN KEY([IDCurso])
REFERENCES [dbo].[TBCurso] ([IDCurso])
GO
ALTER TABLE [dbo].[TBCursoAluno] CHECK CONSTRAINT [FK_TBCursoAluno_TBCurso]
GO
IF NOT EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_TBCurso_TBTipoCurso]') AND parent_object_id = OBJECT_ID(N'[dbo].[TBCurso]'))
ALTER TABLE [dbo].[TBCurso]  WITH CHECK ADD  CONSTRAINT [FK_TBCurso_TBTipoCurso] FOREIGN KEY([IDTipoCurso])
REFERENCES [dbo].[TBTipoCurso] ([IDTipoCurso])
GO
ALTER TABLE [dbo].[TBCurso] CHECK CONSTRAINT [FK_TBCurso_TBTipoCurso]
GO
CREATE TABLE [dbo].[TBCargo] (
    [IDCargo]   INT          IDENTITY (1, 1) NOT NULL PRIMARY KEY,
    [Descricao] VARCHAR (50) NOT NULL
);
GO
CREATE TABLE TBOportunidade(
	IDOportunidade int NOT NULL IDENTITY (1, 1),
	Titulo varchar(50) NOT NULL,
	Descricao varchar(500) NOT NULL,
	IDEmpresa int NOT NULL,
	TelefoneEmpresa char(8) NOT NULL,
	EmailEmpresa varchar(50) NOT NULL,
	IDCargo int NOT NULL,
	SALInicial money NULL,
	SALFinal money NULL,
	STAtivo bit NOT NULL,
	Requisito text NULL,
	DTCadastro datetime NOT NULL
 CONSTRAINT [PK_TBOportunidade] PRIMARY KEY CLUSTERED 
(
	[IDOportunidade] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE dbo.TBOportunidade ADD CONSTRAINT
	FK_TBOportunidade_TBCargo FOREIGN KEY
	(
	IDCargo
	) REFERENCES dbo.TBCargo
	(
	IDCargo
	) ON UPDATE  NO ACTION 
	 ON DELETE  NO ACTION 
	
GO
ALTER TABLE dbo.TBOportunidade ADD CONSTRAINT
	FK_TBOportunidade_TBEmpresa FOREIGN KEY
	(
	IDEmpresa
	) REFERENCES dbo.TBEmpresa
	(
	IDEmpresa
	) ON UPDATE  NO ACTION 
	 ON DELETE  NO ACTION 
	
GO
CREATE TABLE [dbo].[TBPagamento] (
    [IDPagamento]   INT      IDENTITY (1, 1) NOT NULL PRIMARY KEY,
    [IDAluno]       INT      NOT NULL,
    [IDCurso]       INT      NOT NULL,
    [VLTotal]       MONEY    NOT NULL,
    [VLDesconto]    MONEY    NOT NULL,
    [VLFinal]       MONEY    NOT NULL,
    [DiaVencimento] SMALLINT NOT NULL,
    [STMensal]      BIT      NOT NULL
);

CREATE TABLE [dbo].[TBParcela] (
    [IDParcela]    INT      NOT NULL PRIMARY KEY,
    [IDPagamento]  INT      NOT NULL,
    [NRParcela]    SMALLINT NOT NULL,
    [VLTotal]      MONEY    NOT NULL,
    [DTVencimento] DATETIME NOT NULL,
    [STPago]       BIT      NOT NULL
);
GO
CREATE TABLE [dbo].[TBProjeto] (
    [ID]             INT          IDENTITY (1, 1) NOT NULL,
    [Nome]           VARCHAR (30) NOT NULL,
    [Descricao]      TEXT         NOT NULL,
    [DTInicio]       DATE         NULL,
    [DTFimReal]      DATE         NULL,
    [DTFimPrevisto]  DATE         NULL,
    [DTCadastro]     DATE         NOT NULL,
    [IDProductOwner] INT          NOT NULL,
    [IDScrumMaster]  INT          NULL,
    [TamanhoSprint]  SMALLINT     NULL,
    [Valor]          MONEY        NULL
);


ALTER TABLE [dbo].[TBProjeto]
    ADD CONSTRAINT [PK_TBProjeto] PRIMARY KEY CLUSTERED ([ID] ASC) WITH (ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF);

CREATE TABLE [dbo].[TBEpoca] (
    [ID]         INT           IDENTITY (1, 1) NOT NULL,
    [Frase]      VARCHAR (200) NOT NULL,
    [Descricao]  VARCHAR (500) NOT NULL,
    [DTCadastro] DATE          NOT NULL,
    [IDProjeto]  INT           NOT NULL
);


ALTER TABLE [dbo].[TBEpoca]
    ADD CONSTRAINT [PK_TBEpoca] PRIMARY KEY CLUSTERED ([ID] ASC) WITH (ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF);


CREATE TABLE [dbo].[TBEquipe] (
    [IDProjeto] INT NOT NULL,
    [IDAluno] INT NOT NULL,
    [STAtivo]   BIT NOT NULL
);


ALTER TABLE [dbo].[TBEquipe]
    ADD CONSTRAINT [PK_TBEquipe] PRIMARY KEY CLUSTERED ([IDProjeto] ASC, [IDAluno] ASC) WITH (ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF);


CREATE TABLE [dbo].[TBSprint] (
    [ID]         INT      IDENTITY (1, 1) NOT NULL,
    [NRSprint]   SMALLINT NOT NULL,
    [DTInicio]   DATE     NOT NULL,
    [DTFim]      DATE     NOT NULL,
    [Capacidade] INT      NOT NULL,
    [IDProjeto]  INT      NOT NULL
);


ALTER TABLE [dbo].[TBSprint]
    ADD CONSTRAINT [PK_TBSprint] PRIMARY KEY CLUSTERED ([ID] ASC) WITH (ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF);


CREATE TABLE [dbo].[TBVisaoProduto] (
    [ID]        INT           IDENTITY (1, 1) NOT NULL,
    [Descricao] TEXT          NOT NULL,
    [Video]     VARCHAR (100) NULL,
    [IDProjeto] INT           NOT NULL
);

ALTER TABLE [dbo].[TBVisaoProduto]
    ADD CONSTRAINT [PK_TBVisaoProduto] PRIMARY KEY CLUSTERED ([ID] ASC) WITH (ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF);

ALTER TABLE [dbo].[TBEpoca] WITH NOCHECK
    ADD CONSTRAINT [FK_TBEpoca_TBProjeto] FOREIGN KEY ([IDProjeto]) REFERENCES [dbo].[TBProjeto] ([ID]) ON DELETE NO ACTION ON UPDATE NO ACTION;

ALTER TABLE [dbo].[TBEquipe] WITH NOCHECK
    ADD CONSTRAINT [FK_TBEquipe_TBProjeto] FOREIGN KEY ([IDProjeto]) REFERENCES [dbo].[TBProjeto] ([ID]) ON DELETE NO ACTION ON UPDATE NO ACTION;

ALTER TABLE [dbo].[TBEquipe] WITH NOCHECK
    ADD CONSTRAINT [FK_TBEquipe_TBAluno] FOREIGN KEY ([IDAluno]) REFERENCES [dbo].[TBAluno] ([IDAluno]) ON DELETE NO ACTION ON UPDATE NO ACTION;

ALTER TABLE [dbo].[TBProjeto] WITH NOCHECK
    ADD CONSTRAINT [FK_TBProjeto_TBAluno] FOREIGN KEY ([IDProductOwner]) REFERENCES [dbo].[TBAluno] ([IDAluno]) ON DELETE NO ACTION ON UPDATE NO ACTION;

ALTER TABLE [dbo].[TBProjeto] WITH NOCHECK
    ADD CONSTRAINT [FK_TBProjeto_TBAluno1] FOREIGN KEY ([IDScrumMaster]) REFERENCES [dbo].[TBAluno] ([IDAluno]) ON DELETE NO ACTION ON UPDATE NO ACTION;

ALTER TABLE [dbo].[TBSprint] WITH NOCHECK
    ADD CONSTRAINT [FK_TBSprint_TBProjeto] FOREIGN KEY ([IDProjeto]) REFERENCES [dbo].[TBProjeto] ([ID]) ON DELETE NO ACTION ON UPDATE NO ACTION;

ALTER TABLE [dbo].[TBVisaoProduto] WITH NOCHECK
    ADD CONSTRAINT [FK_TBVisaoProduto_TBProjeto] FOREIGN KEY ([IDProjeto]) REFERENCES [dbo].[TBProjeto] ([ID]) ON DELETE NO ACTION ON UPDATE NO ACTION;
GO
CREATE TABLE [dbo].[TBBlogs](
	[IDCodigo] [int] IDENTITY(1,1) NOT NULL,
	[Nome] [varchar](30) NOT NULL,
	[URL] [varchar](255) NOT NULL,
	[STAtivo] [bit] NOT NULL,
 CONSTRAINT [PK_TBBLogs] PRIMARY KEY CLUSTERED 
(
	[IDCodigo] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[TBDepoimento] (
[ID] INT IDENTITY (1, 1) NOT NULL PRIMARY KEY,
[IDAluno] [int] NOT NULL,
[ComentarioInstrutor] [varchar](500) NOT NULL,
[Texto] [text] NOT NULL
);

ALTER TABLE [dbo].[TBDepoimento] WITH NOCHECK
    ADD CONSTRAINT [FK_TBDepoimento_TBAluno] FOREIGN KEY ([IDAluno]) REFERENCES [dbo].[TBAluno] ([IDAluno]) ON DELETE NO ACTION ON UPDATE NO ACTION;